package com.example.administrator.myweiyue.ui.fragment.news;


import android.view.View;

import com.example.administrator.myweiyue.R;
import com.example.administrator.myweiyue.ui.base.MyBaseFragment;
import com.example.administrator.myweiyue.ui.component.AppComponent;
import com.example.administrator.myweiyue.ui.component.DaggerNewComponent;
import com.example.administrator.myweiyue.ui.fragment.news.contract.NewContract;
import com.example.administrator.myweiyue.ui.fragment.news.present.NewPresent;


public class NewFragment extends MyBaseFragment<NewPresent> implements NewContract.View {

    @Override
 public int getLayoutId() {
        return R.layout.fragment_news;
    }

    //注册dagger2
    @Override
    public void initInjector(AppComponent appComponent) {

      DaggerNewComponent.builder().appComponent(appComponent).build().inject(this);
    }

    //初始化view
    @Override
    public void afterViewCreate(View mRootView) {

    }


    //有本地缓存就用缓存，没有就加载网络
    @Override
    public void initData() {
        mPresenter.loadData();
    }

    //网络请求数据
   @Override
   public void getData() {

   }
}
